package com.gtxc.kotlinmvvm.viewmodle

import android.util.Log
import androidx.lifecycle.MutableLiveData
import com.aleyn.mvvm.base.BaseViewModel
import com.gtxc.kotlinmvvm.network.request.ParticularsBean
import com.mot.st.network.request.ApiNetWork

/**
 * FileName:NewsDetailsViewModle
 * Author：Administrator
 * Date:2021 2021/9/29 19:47
 * Copyright (C), 2020-2021,成都拇音科技有限公司
 *
 *
 *
 *
 * Description:
 * History:
 * <author> <time> <version> <desc>
 * 作者姓名 修改时间 版本号 描述
</desc></version></time></author> */
class NewsDetailsViewModle : BaseViewModel(){
    val particularsBean = MutableLiveData<ParticularsBean>()
    init {

    }
      fun InitData(int: Int){
          launchUI {
          val  result=   ApiNetWork.getInstance().getdetail(int)
              if (result.success){
                  particularsBean.value=result.resultObj
                  Log.i("",result.resultObj.content)
              }
          }
      }
}